home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 August / macformat-027.iso / mac / Shareware City / Developers / Oberon⁄F / System / Docu / Ports (.txt) < prev    next >
Encoding:
Oberon Document  |  1994-06-07  |  42.9 KB  |  426 lines  |  [oODC/obnF]

  1. Documents.StdDocumentDesc
  2. Documents.DocumentDesc
  3. Containers.ViewDesc
  4. Views.ViewDesc
  5. Stores.StoreDesc
  6. Documents.ModelDesc
  7. Containers.ModelDesc
  8. Models.ModelDesc
  9. Stores.ElemDesc
  10. TextViews.StdViewDesc
  11. TextViews.ViewDesc
  12. TextModels.StdModelDesc
  13. TextModels.ModelDesc
  14. TextModels.AttributesDesc
  15. Geneva
  16. TextRulers.StdRulerDesc
  17. TextRulers.RulerDesc
  18. TextRulers.StdStyleDesc
  19. TextRulers.StyleDesc
  20. TextRulers.AttributesDesc
  21. Geneva
  22. HostPictures.StdViewDesc
  23. Geneva
  24. Dialog
  25. Views
  26. Files
  27. Ports
  28. Domains
  29. Fonts
  30. Stores
  31. Models
  32. Controllers
  33. Geneva
  34. Geneva
  35. (0, 0)
  36. (1, 1)
  37. (2, 2)
  38. area of one pixel
  39. Geneva
  40. Geneva
  41. openPoly
  42. closedPoly
  43. openBezier
  44. closedBezier
  45. filled closedPoly
  46. filled closedBezier
  47. Geneva
  48. (x0, y0)
  49. (x1, y1)
  50. Geneva
  51. scroll vector
  52. undefined area
  53. before scrolling
  54. after scrolling
  55. Geneva
  56. (x0, y0)
  57. (x1, y1)
  58. Geneva
  59. scroll vector
  60. undefined area
  61. before scrolling
  62. after scrolling
  63. 5.5 Ports
  64. DEFINITION Ports;
  65.     IMPORT Fonts;
  66.     CONST
  67.         black = 00000000H; white = 00FFFFFFH;
  68.         grey6 = 00F0F0F0H; grey12 = 00E0E0E0H; grey25 = 00C0C0C0H;
  69.         grey50 = 00808080H; grey75 = 00404040H;
  70.         red = 000000FFH; green = 0000FF00H; blue = 00FF0000H;
  71.         defaultColor = 01000000H;
  72.         mm = 36000;
  73.         point = LONG(12700);
  74.         inch = 914400;
  75.         fill = -1;
  76.         openPoly = 0; closedPoly = 1; openBezier = 2; closedBezier = 3;
  77.         invert = 0; hilite = 1; dim25 = 2; dim50 = 3; dim75 = 4;
  78.         hide = FALSE; show = TRUE;
  79.         arrowCursor = 0; textCursor = 1; graphicsCursor = 2; tableCursor = 3; bitmapCursor = 4;
  80.     TYPE
  81.         LONGCHAR = INTEGER;
  82.         Color = LONGINT;
  83.         Point = RECORD
  84.             x, y: LONGINT
  85.         END;
  86.         Port = POINTER TO PortDesc;
  87.         PortDesc = RECORD
  88.             unit-: LONGINT;
  89.             colors-: LONGINT;
  90.             w-, h-: LONGINT;
  91.             PROCEDURE (p: Port) Init (unit, colors: LONGINT);
  92.             PROCEDURE (p: Port) SetSize (w, h: LONGINT);
  93.             PROCEDURE (p: Port) NewRider (): Rider;
  94.             PROCEDURE (p: Port) OpenBuffer (l, t, r, b: LONGINT);
  95.             PROCEDURE (p: Port) CloseBuffer
  96.         END;
  97.         Rider = POINTER TO RiderDesc;
  98.         RiderDesc = RECORD
  99.             l-, t-, r-, b-: LONGINT;
  100.             PROCEDURE (rd: Rider) Set (l, t, r, b: LONGINT);
  101.             PROCEDURE (rd: Rider) Base (): Port;
  102.             PROCEDURE (rd: Rider) Move (dx, dy: LONGINT);
  103.             PROCEDURE (rd: Rider) DrawRect (l, t, r, b, s: LONGINT; col: Color);
  104.             PROCEDURE (rd: Rider) DrawOval (l, t, r, b, s: LONGINT; col: Color);
  105.             PROCEDURE (rd: Rider) DrawLine (x0, y0, x1, y1, s: LONGINT; col: Color);
  106.             PROCEDURE (rd: Rider) DrawPath (VAR p: ARRAY OF Point; n, s: LONGINT; col: Color;
  107.                                                                         path: INTEGER);
  108.             PROCEDURE (rd: Rider) MarkRect (l, t, r, b, s: LONGINT; mode: INTEGER; show: BOOLEAN);
  109.             PROCEDURE (rd: Rider) Scroll (dx, dy: LONGINT);
  110.             PROCEDURE (rd: Rider) SetCursor (cursor: INTEGER);
  111.             PROCEDURE (rd: Rider) Input (VAR x, y: LONGINT; VAR isDown: BOOLEAN);
  112.             PROCEDURE (rd: Rider) DrawString (x, y: LONGINT; col: Color; VAR s: ARRAY OF CHAR;
  113.                                                                         font: Fonts.Font);
  114.             PROCEDURE (rd: Rider) DrawLString (x, y: LONGINT; col: Color; VAR s: ARRAY OF LONGCHAR;
  115.                                                                         font: Fonts.Font);
  116.             PROCEDURE (rd: Rider) CharIndex (x, pos: LONGINT; VAR s: ARRAY OF CHAR;
  117.                                                                         font: Fonts.Font): LONGINT;
  118.             PROCEDURE (rd: Rider) LCharIndex (x, pos: LONGINT; VAR s: ARRAY OF LONGCHAR;
  119.                                                                         font: Fonts.Font): LONGINT;
  120.             PROCEDURE (rd: Rider) CharPos (x, index: LONGINT; VAR s: ARRAY OF CHAR;
  121.                                                                         font: Fonts.Font): LONGINT;
  122.             PROCEDURE (rd: Rider) LCharPos (x, index: LONGINT; VAR s: ARRAY OF LONGCHAR;
  123.                                                                         font: Fonts.Font): LONGINT
  124.         END;
  125.         Frame = POINTER TO FrameDesc;
  126.         FrameDesc = RECORD
  127.             unit-, colors-: LONGINT;
  128.             dot-: LONGINT;
  129.             rider-: Rider;
  130.             gx-, gy-: LONGINT;
  131.             PROCEDURE (f: Frame) ConnectTo (p: Port);
  132.             PROCEDURE (f: Frame) SetOffset (gx, gy: LONGINT);
  133.             PROCEDURE (f: Frame) DrawRect (l, t, r, b, s: LONGINT; col: Color);
  134.             PROCEDURE (f: Frame) DrawOval (l, t, r, b, s: LONGINT; col: Color);
  135.             PROCEDURE (f: Frame) DrawLine (x0, y0, x1, y1, s: LONGINT; col: Color);
  136.             PROCEDURE (f: Frame) DrawPath (VAR p: ARRAY OF Point; n, s: LONGINT; col: Color;
  137.                                                                         path: INTEGER);
  138.             PROCEDURE (f: Frame) MarkRect (l, t, r, b, s: LONGINT; mode: INTEGER; show: BOOLEAN);
  139.             PROCEDURE (f: Frame) Scroll (dx, dy: LONGINT);
  140.             PROCEDURE (f: Frame) SetCursor (cursor: INTEGER);
  141.             PROCEDURE (f: Frame) Input (VAR x, y: LONGINT; VAR isDown: BOOLEAN);
  142.             PROCEDURE (f: Frame) DrawString (x, y: LONGINT; col: Color; s: ARRAY OF CHAR;
  143.                                                                         font: Fonts.Font);
  144.             PROCEDURE (f: Frame) DrawLString (x, y: LONGINT; col: Color; s: ARRAY OF LONGCHAR;
  145.                                                                         font: Fonts.Font);
  146.             PROCEDURE (f: Frame) CharIndex (x, pos: LONGINT; s: ARRAY OF CHAR;
  147.                                                                         font: Fonts.Font): LONGINT;
  148.             PROCEDURE (f: Frame) LCharIndex (x, pos: LONGINT; s: ARRAY OF LONGCHAR;
  149.                                                                         font: Fonts.Font): LONGINT;
  150.             PROCEDURE (f: Frame) CharPos (x, index: LONGINT; s: ARRAY OF CHAR;
  151.                                                                         font: Fonts.Font): LONGINT;
  152.             PROCEDURE (f: Frame) LCharPos (x, index: LONGINT; s: ARRAY OF LONGCHAR;
  153.                                                                         font: Fonts.Font): LONGINT
  154.         END;
  155.     VAR background: Color;
  156. END Ports.
  157. Ports are carriers for pixel data. Examples of ports are screen and printer ports.
  158. Riders are access paths to ports. The drawing operations of a rider are performed in a coordinate system with positive x-axis and negative y-axis, i.e. x values increase towards the right, while y values increase towards the bottom. This coordinate system is the same for every rider on a port, with the origin at the upper-left corner of the port. Points are coordinate pairs (in device coordinates) which denote the upper-left corner of a pixel:
  159. Picture 5.5a  Drawing Plane
  160. A rider occupies a rectangle within the port area. Each rider acts as a clipping rectangle, to which all its drawing operations are clipped.
  161. Frames are port mappers, which provide port output operations and input from mouse and keyboard. Frame coordinates are scaled and translated such that they are independent of the frame's position on a port, and independent of the port's spacial resolution.
  162. CONST black, white, grey6, grey12, grey25, grey50, grey75, red, green, blue
  163. RGB values for several important colors.
  164. CONST defaultColor
  165. This is a pseudo color which is substituted by the currently set default foreground color for drawing.
  166. CONST mm, point, inch
  167. Three important distance measures in universal units.
  168. CONST fill
  169. This value may be passed to the procedures DrawRect, DrawOval, DrawPath, and MarkRect as size parameter, to cause the drawing of a filled shape, instead of the shape's outline only.
  170. CONST openPoly, closedPoly, openBezier, closedBezier
  171. These values may be passed to the procedure DrawPath as path parameter. They causes the drawing of a polyline, a polygon, an open Bezier curve, or of a closed Bezier curve.
  172. Picture 5.5b  Various Path Examples
  173. CONST invert, hilite, dim25, dim50, dim75
  174. These values may be passed as mode-parameter to procedure MarkRect. They cause the marked rectangle to become inverted, hilighted, or dimmed. The exact interpretation of these modes is platform-dependent. However, they should alter the display visibly, and they must be invertable. This means that successively drawing a pixel in the same mode twice results in the pixel having the same color as before, provided that no other drawing operation has been performed there in between.
  175. In the simplest case, all three modes are implemented the same way, namely by inverting each bit in the color value which represents a pixel. Ideally, hilite should replace an area's background color with a user-selectable hilight-color, and vice versa. The three dimming modes, applied to a white background, deliver light, medium, and dark grey values, respectively.
  176. CONST hide, show
  177. These values may be passed as show-parameter of the MarkRect procedures. hide means that an existing mark should be removed, and show means that the mark should be drawn.
  178. CONST arrowCursor
  179. The default shape of the cursor.
  180. CONST textCursor, graphicsCursor, tableCursor, bitmapCursor
  181. Cursor shapes which correspond to the type of data currently being manipulated: sequential, large shapes, regularly arranged objects, small shapes.
  182. TYPE LONGCHAR
  183. Type for 2-byte characters in the Unicode character set.
  184. TYPE Color = LONGINT
  185. A color is a four-byte value where the least significant byte (interpreted as unsigned integer) specifies the red-intensity of an RGB triple. The next byte specifies the green-intensity, the third byte represents the blue-intensity. The most significant byte must be set to zero.
  186. TYPE Point
  187. This type is used to construct paths for the DrawPath procedure. A path consists of an array of points, where points are coordinate pairs.
  188. Points are used in drawing routines that call DrawPath.
  189. Points are not extended.
  190. x, y: LONGINT
  191. Coordinate pair.
  192. TYPE Port
  193. Interface
  194. Carrier for pixel data.
  195. Ports are allocated and used internally.
  196. Ports are extended internally.
  197. unit-: LONGINT    unit > 0
  198. The size of a pixel in universal units.
  199. colors-: LONGINT    2 <= colors <= 1000000H
  200. The number of different colors supported by this port.
  201. w-, h-: LONGINT    w >= 0  &  h >= 0    [pixels]
  202. Width and height of the port in pixels.
  203. PROCEDURE (p: Port) Init (unit, colors: LONGINT)
  204. Sets the spacial resolution (in universal units per pixel) and the color resolution (in number of colors).
  205. p.unit = 0    20    port must not be initialized yet
  206. unit > 0    21
  207. 2 <= colors <= 1000000H    22
  208. p.unit = unit  &  p.colors = colors
  209. PROCEDURE (p: Port) SetSize (w, h: LONGINT)
  210. Sets the port's size, in pixels.
  211. w >= 0    20
  212. h >= 0    21
  213. p.w = w
  214. p.h = h
  215. PROCEDURE (p: Port) NewRider (): Rider
  216. Interface
  217. Returns a rider which has the appropriate type for this port implementation.
  218. PROCEDURE (p: Port) OpenBuffer (l, t, r, b: LONGINT)
  219. Interface
  220. Opens an off-screen buffer for port p. If old = NIL, then a new buffer is allocated. The new buffer is initialized with the contents of p's rectangle (l, t, r, b). OpenBuffer must be followed by a call to CloseBuffer. Calls to OpenBuffer must not be nested.
  221. PROCEDURE (p: Port) CloseBuffer
  222. Interface
  223. Copy back the contents of the port's off-screen buffer, and release the buffer. OpenBuffer must have been called before.
  224. TYPE Rider
  225. Interface
  226. Access path to a port (i.e. to a pixel carrier). A rider uses the same coordinate system as its port, with the origin being the upper-left corner of the port. All coordinates used for a rider are in device coordinates, i.e. in pixels.
  227. Riders are allocated by ports.
  228. Riders are used and extended internally.
  229. l-, t-, r-, b-: LONGINT    0 <= l <= r  &  0 <= t <= b    [pixels]
  230. Rider rectangle on the port.
  231. PROCEDURE (rd: Rider) Set (l, t, r, b: LONGINT)
  232. Sets the rider rectangle on the port.
  233. 0 <= l <= r  &  0 <= t <= b    20
  234. rd.l = l  &  rd.t = t  &  rd.r = r  &  rd.b = b
  235. PROCEDURE (rd: Rider) Base (): Port
  236. Interface
  237. Returns the port to which rd is connected.
  238. result # NIL
  239. PROCEDURE (rd: Rider) Move (dx, dy: LONGINT)
  240. Empty
  241. Used internally.
  242. PROCEDURE (rd: Rider) DrawRect (l, t, r, b, s: LONGINT; col: Color)
  243. Interface
  244. Draws a rectangle (parallel to the coordinate axes) of width r - l and of height b - t. If s < 0, the rectangle is filled with color col. Otherwise, the rectangle is drawn as an outline of thickness s. The outline is drawn inside of the rectangle. If s = 0, a very thin outline (hairline) is used.
  245. PROCEDURE (rd: Rider) DrawOval (l, t, r, b, s: LONGINT; col: Color)
  246. Interface
  247. Draws an ellipse (parallel to the coordinate axes) of width r - l and of height b - t. If s < 0, the ellipse is filled with color col. Otherwise, the ellipse is drawn as an outline of thickness s. The outline is drawn inside of the rectangle. If s = 0, a very thin outline (hairline) is used.
  248. PROCEDURE (rd: Rider) DrawLine (x0, y0, x1, y1, s: LONGINT; col: Color)
  249. Interface
  250. Draws a line from the point (x0, y0) to the point (x1, y1) of thickness s in color col:
  251. Picture 5.5c  Line
  252. If s = 0, a very thin outline (hairline) is used.
  253. s >= 0    20
  254. PROCEDURE (rd: Rider) DrawPath (VAR p: ARRAY OF Point; n, s: LONGINT; col: Color;
  255.                                                                 path: INTEGER)
  256. Interface
  257. Draws the path consisting of points p[0] .. p[n - 1] in color col. The nature of the path is given by parameter path. It can either be a polyline, a polygon, an open Bezier curve, or a closed Bezier curve. The polyline is the same that a sequence of DrawLine operations would generate. For a polygon, the n points define the mathematical region which will be outlined or filled. An open path with n points results in n - 1 path pieces, a closed path with n points results in n path pieces.
  258. SIZE(p) >= n    index error
  259. path = openPoly
  260.     n >= 2    20
  261. path = closedPoly
  262.     n >= 3    20
  263. path = openBezier
  264.     n >= 2    20
  265. path = closedBezier
  266.     n >= 3    20
  267. s >= 0    21
  268. PROCEDURE (rd: Rider) MarkRect (l, t, r, b, s: LONGINT; mode: INTEGER; show: BOOLEAN)
  269. Interface
  270. Marks a rectangle (parallel to the coordinate axes) of width r - l and of height b - t. If s < 0, the rectangle is filled with color col. Otherwise, the rectangle is drawn as an outline of thickness s. The outline is drawn inside of the rectangle. If s = 0, a very thin outline (hairline) is used.
  271. The meaning of mode is implementation-dependent, but it must change the marked area in a visible way, and it must be invertable. show indicates whether the mark should be drawn or removed.
  272. mode IN {invert, hilite, dim25, dim50, dim75}    20
  273. PROCEDURE (rd: Rider) Scroll (dx, dy: LONGINT)
  274. Interface
  275. Shifts the rider's contents by vector (dx, dy). Shifting occurs completely within the rider's rectangle, ie. pixels outside of it are neither written nor read. The part of the rectangle which becomes newly exposed is undefined.
  276. The purpose of Scroll is to speed up scrolling operations by reusing existing pixel data instead of making the application redraw everything.
  277. However, under special circumstances, this procedure may not actually copy pixel data, but cause the application to restore part of the rectangle instead anyway.
  278. Warning: this operation may only be used on interactive ports, in order to update the screen display after a user manipulation.
  279. Picture 5.5d  Effect of Scroll Operation
  280. PROCEDURE (rd: Rider) SetCursor (cursor: INTEGER)
  281. Interface
  282. Sets the cursor to the given value.
  283. cursor IN {arrowCursor..resizeCursor}    20
  284. PROCEDURE (rd: Rider) Input (VAR x, y: LONGINT; VAR isDown: BOOLEAN)
  285. Interface
  286. Polls the current mouse location and tells whether the mouse button is currently pressed.
  287. PROCEDURE (rd: Rider) DrawString (x, y: LONGINT; col: Color; VAR s: ARRAY OF CHAR;
  288.             font: Fonts.Font);
  289. Interface
  290. Draws string s in color col and font font with the base line at y.
  291. Warning: the contents of parameter s may be changed by the operation.
  292. font # NIL    20
  293. PROCEDURE (rd: Rider) DrawLString (x, y: LONGINT; col: Color;
  294.                                                                     VAR s: ARRAY OF LONGCHAR; font: Fonts.Font);
  295. Interface
  296. Draws string s in color col and font font with the base line at y.
  297. Warning: the contents of parameter s may be changed by the operation.
  298. font # NIL    20
  299. PROCEDURE (rd: Rider) CharIndex (x, pos: LONGINT; VAR s: ARRAY OF CHAR;
  300.                                                                     font: Fonts.Font): LONGINT
  301. Interface
  302. Given string s at position x, CharIndex determines the index of the character which lies at position pos. Result = 0 means pos is at or left of the first character in s, result = n - 1, where n is the number of characters in string s, means pos is right of the last character in s.
  303. Warning: the contents of parameter s may be changed by the operation.
  304. font # NIL    20
  305. PROCEDURE (rd: Rider) LCharIndex (x, pos: LONGINT; VAR s: ARRAY OF LONGCHAR;
  306.                                                                     font: Fonts.Font): LONGINT
  307. Interface
  308. Given string s at position x, CharIndex determines the index of the character which lies at position pos. Result = 0 means pos is at or left of the first character in s, result = n - 1, where n is the number of characters in string s, means pos is right of the last character in s.
  309. Warning: the contents of parameter s may be changed by the operation.
  310. font # NIL    20
  311. PROCEDURE (rd: Rider) CharPos (x, index: LONGINT; VAR s: ARRAY OF CHAR;
  312.                                                                     font: Fonts.Font): LONGINT
  313. Interface
  314. Given string s at position x, CharPos determines the position of character index in s. The position of the left margin of the character is returned.
  315. Warning: the contents of parameter s may be changed by the operation.
  316. font # NIL    20
  317. PROCEDURE (rd: Rider) LCharPos (x, index: LONGINT; VAR s: ARRAY OF LONGCHAR;
  318.                                                                     font: Fonts.Font): LONGINT
  319. Interface
  320. Given string s at position x, CharPos determines the position of character index in s. The position of the left margin of the character is returned.
  321. Warning: the contents of parameter s may be changed by the operation.
  322. font # NIL    20
  323. TYPE Frame
  324. A Frame is a mapper for a port. Every frame has its own coordinate system. All coordinates used for a frame are measured in universal units. Most frame operations forward to the frame's rider, i.e. they call the frame rider's corresponding procedure, and perform the necessary coordinate transformations (scaling between universal units and pixels, and a translation by the frame's origin).
  325. Frames are allocated by views.
  326. Frames are used by views, for drawing and for mouse polling.
  327. Frames are extended internally (Views.Frame).
  328. unit-: LONGINT    unit > 0
  329. The size of a pixel in universal units.
  330. colors-: LONGINT    2 <= colors <= 1000000H
  331. The number of different colors supported by this port.
  332. dot-: LONGINT    dot = point - unit MOD point
  333. This value can be used as an approximation of point, rounded to a pixel. By using dot instead of point, ugly rounding errors can be avoided.
  334. rider-: Ports.Rider
  335. Rider which links the frame to a port.
  336. gx-, gy-: LONGINT    [units]
  337. The frame's origin in global coordinates (i.e. relative to the port's upper-left corner), but in units.
  338. PROCEDURE (f: Frame) ConnectTo (p: Port)
  339. Connects the frame to a port. All other frame procedures require a connected frame, i.e. rider # NIL. This precondition is not checked explicitly.
  340. ConnectTo is used internally.
  341. p = NIL
  342.     f.unit = 0
  343.     f.colors = 0
  344.     f.rider = NIL
  345. p # NIL
  346.     f.unit = p.Base().unit
  347.     f.colors = p.Base().colors
  348.     f.rider # NIL  &  f.rider.Base() = p
  349. PROCEDURE (f: Frame) SetOffset (gx, gy: LONGINT)
  350. Sets the frame's origin, in global coordinates and units. All local coordinates are relative to this origin.
  351. SetOffset is used internally.
  352. f.rider # NIL    20
  353. f.gx = gx  &  f.gy = gy
  354. PROCEDURE (f: Frame) DrawRect (l, t, r, b, s: LONGINT; col: Color)
  355. Draws a rectangle (parallel to the coordinate axes) of width r - l and of height b - t. If s < 0, the rectangle is filled with color col. Otherwise, the rectangle is drawn as an outline of thickness s. The outline is drawn inside of the rectangle. If s = 0, a very thin outline (hairline) is used.
  356. PROCEDURE (f: Frame) DrawOval (l, t, r, b, s: LONGINT; col: Color)
  357. Draws an ellipse (parallel to the coordinate axes) of width r - l and of height b - t. If s < 0, the ellipse is filled with color col. Otherwise, the ellipse is drawn as an outline of thickness s. The outline is drawn inside of the rectangle. If s = 0, a very thin outline (hairline) is used.
  358. PROCEDURE (f: Frame) DrawLine (x0, y0, x1, y1, s: LONGINT; col: Color)
  359. Draws a line from the point (x0, y0) to the point (x1, y1) of thickness s in color col:
  360. Picture 5.5e  Line
  361. If s = 0, a very thin outline (hairline) is used.
  362. s >= 0    20
  363. PROCEDURE (f: Frame) DrawPath (VAR p: ARRAY OF Point; n, s: LONGINT; col: Color;
  364.                                                                 path: INTEGER)
  365. Draws the path consisting of points p[0] .. p[n - 1] in color col. The nature of the path is given by parameter path. It can either be a polyline, a polygon, an open Bezier curve, or a closed Bezier curve. The polyline is the same that a sequence of DrawLine operations would generate. For a polygon, the n points define the mathematical region which will be outlined or filled. An open path with n points results in n - 1 path pieces, a closed path with n points results in n path pieces.
  366. SIZE(p) >= n    index error
  367. path = openPoly
  368.     n >= 2    20
  369. path = closedPoly
  370.     n >= 3    20
  371. path = openBezier
  372.     n >= 2    20
  373. path = closedBezier
  374.     n >= 3    20
  375. s >= 0    21
  376. PROCEDURE (f: Frame) MarkRect (l, t, r, b, s: LONGINT; col: Color; mode: INTEGER;
  377.                                                                 show: BOOLEAN)
  378. Marks a rectangle (parallel to the coordinate axes) of width r - l and of height b - t. If s < 0, the rectangle is filled with color col. Otherwise, the rectangle is drawn as an outline of thickness s. The outline is drawn inside of the rectangle.
  379. The meaning of mode is implementation-dependent, but it must change the marked area in a visible way, and it must be involutory. If s = 0, a very thin outline (hairline) is used. show indicates whether the mark should be drawn or removed.
  380. mode IN {invert, hilite, dim25, dim50, dim75}    20
  381. PROCEDURE (f: Frame) Scroll (dx, dy: LONGINT)
  382. Shifts the frame's area by vector (dx, dy). Shifting occurs completely within the frame's rectangle, ie. pixels outside of it are neither written nor read. The part of the rectangle which becomes newly exposed should be considered as undefined.
  383. The purpose of Scroll is to speed up scrolling and editing operations by reusing existing pixel data instead of making the application redraw everything.
  384. However, under special circumstances, this procedure may not actually copy pixel data, but cause the application to restore part of the rectangle instead anyway.
  385. Warning: this operation may only be used on interactive ports, in order to update the screen display after a user manipulation.
  386. Picture 5.5f  Effect of Scroll Operation
  387. PROCEDURE (f: Frame) SetCursor (cursor: INTEGER)
  388. Sets the cursor to the given value.
  389. SetCursor is used in polling loops during mouse tracking.
  390. cursor IN {arrowCursor..resizeCursor}    20
  391. PROCEDURE (f: Frame) Input (VAR x, y: LONGINT; VAR isDown: BOOLEAN)
  392. Polls the current mouse location and tells whether the mouse button is currently pressed.
  393. Input is used in polling loops during mouse tracking.
  394. PROCEDURE (f: Frame) DrawString (x, y: LONGINT; col: Color; s: ARRAY OF CHAR;
  395.                                                                     font: Fonts.Font)
  396. Draws string s in color col and font font with the base line at y.
  397. font # NIL    20
  398. PROCEDURE (f: Frame) DrawLString (x, y: LONGINT; col: Color; s: ARRAY OF LONGCHAR;
  399.                                                                     font: Fonts.Font)
  400. Draws string s in color col and font font with the base line at y.
  401. font # NIL    20
  402. PROCEDURE (f: Frame) CharIndex (x, pos: LONGINT; s: ARRAY OF CHAR;
  403.                                                                     font: Fonts.Font): LONGINT
  404. Given string s at position x, CharIndex determines the index of the character which lies at position pos. Result = 0 means pos is at or left of the first character in s, result = n - 1, where n is the number of characters in string s, means pos is right of the last character in s.
  405. font # NIL    20
  406. PROCEDURE (f: Frame) LCharIndex (x, pos: LONGINT; s: ARRAY OF LONGCHAR;
  407.                                                                     font: Fonts.Font): LONGINT
  408. Given string s at position x, CharIndex determines the index of the character which lies at position pos. Result = 0 means pos is at or left of the first character in s, result = n - 1, where n is the number of characters in string s, means pos is right of the last character in s.
  409. font # NIL    20
  410. PROCEDURE (f: Frame) CharPos (x, index: LONGINT; s: ARRAY OF CHAR;
  411.                                                                     font: Fonts.Font): LONGINT
  412. Given string s at position x, CharPos determines the position of character index in s. The position of the left margin of the character is returned.
  413. font # NIL    20
  414. PROCEDURE (f: Frame) LCharPos (x, index: LONGINT; s: ARRAY OF LONGCHAR;
  415.                                                                     font: Fonts.Font): LONGINT
  416. Given string s at position x, CharPos determines the position of character index in s. The position of the left margin of the character is returned.
  417. font # NIL    20
  418. VAR background: Color    background >= 0
  419. This variable denotes the color which is used for the window background.
  420. TextControllers.StdCtrlDesc
  421. TextControllers.ControllerDesc
  422. Containers.ControllerDesc
  423. Controllers.ControllerDesc
  424. Geneva
  425. Documents.ControllerDesc
  426.